bits = 0;
for I = 1:3
    [component, w, h, levels] = readjas(I);
    [m, b] = component_cod(component, levels, w, h, I);
    bits = bits + count_bits(m, b, I);
end;
disp('bits');
disp(bits);
